set nocompatible    " first line
set background=dark    " dark background
filetype plugin indent on    " automatically detect file types
syntax on    " syntax highlighting
set encoding=utf-8
scriptencoding utf-8
set shortmess=atI    " abbreviations of messages
set viewoptions=folds,options,cursor,unix,slash    " specifies what to save for :mkview
set history=300    " number of command-lines that are remembered
set showmode    " show current mode
set ruler    " show cursor line and column in the status line
set number    " print the line number in front of each line
set showcmd    " show partial command in status line
set backspace=indent,eol,start
set linespace=0    " number of pixel lines to use between characters
set showmatch    " briefly jump to matching bracket if insert one
set incsearch    " highlight match while typing
set hlsearch    " highlight matches with last search pattern
set winminheight=1    " minimum number of lines for any window
set ignorecase    " ignore case in search patterns
set smartcase    " no ignore case when pattern has uppercase
set wildmenu    " use menu for command line completion
set wildmode=list:longest,full    " tab completion, list matches, then longest common part, then all
set foldenable    " auto fold code
set list
set listchars=tab:>-,eol:<,nbsp:%,trail:·    " show tab eol nbsp trail
set autoindent    " take indent for new line from previous line
set smartindent    " do smart autoindenting when starting a new line
set expandtab    " use spaces when tab is inserted
set shiftwidth=4    " number of spaces to use for (auto)indent step
set tabstop=4    " number of spaces that tab in file uses
set softtabstop=4    " number of spaces that tab uses while editing
set splitbelow    " new window from split is below the current one
set splitright    " new window is put right of the current one
set scrolloff=5    " minimum number of lines above and below cursor
set cmdheight=2    " number of lines to use for the command-line
set magic    " changes special characters in search patterns
mapclear
xmapclear
smapclear
mapclear!
lmapclear
let mapleader = ","
noremap <leader>w <Esc>:w!<CR>
noremap <leader>q <Esc>:q!<CR>
